package com.studentsys.service;


import com.studentsys.bean.Admin;
import com.studentsys.dao.AdminDao;

public class AdminService {
    //创建AdminDao对象
     private AdminDao dao = new AdminDao();
    //登录验证
    public Admin login(String username, String password){
        return  dao.login(username,password);
    }

    public int regist(String username,String password){
        return dao.regist(username,password);
    }

    public boolean checkUser(String username) {
        Admin admin = dao.checkUser(username);
        if (admin!=null){
            return true;
        }else{
            return false;
        }
    }

}
